package com.liang.kafka.controller;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.annotation.KafkaListener;

import org.springframework.stereotype.Component;



/**
 * @author Administrator
 */
@Component
public class KafkaConsumer {

    public static Logger logger = LoggerFactory.getLogger(KafkaConsumer.class);
    @KafkaListener(topics = {"test"})
    public void get(ConsumerRecord record){
        String values = record.value().toString();
        logger.info("values:" + values);

    }
}
